package com.neu.flashmall.product.mapper;

import com.neu.flashmall.product.entity.PmsSpuInfo;
import com.neu.flashmall.product.vo.PmsSpuInfoVo;
import com.neu.flashmall.product.vo.RecommendSpuListVo;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Param;

import java.util.List;

/**
* @author 86151
* @description 针对表【pms_spu_info(spu信息)】的数据库操作Mapper
* @createDate 2022-07-08 16:25:49
* @Entity com.neu.flashmall.product.entity.PmsSpuInfo
*/
@Mapper
public interface PmsSpuInfoMapper {
    List<PmsSpuInfo> selectAll();

    int deleteByPrimaryKey(Long id);

    int insert(PmsSpuInfo record);

    int insertSelective(PmsSpuInfo record);

    PmsSpuInfo selectByPrimaryKey(Long id);

    int updateByPrimaryKeySelective(PmsSpuInfo record);

    int updateByPrimaryKey(PmsSpuInfo record);

    PmsSpuInfo selectBySpuName(String spuName);

    List<PmsSpuInfo> selectByCategoryId(@Param("categoryId") Long categoryId,@Param("quantity") int quantity);

    List<PmsSpuInfo> selectByIdList(@Param("categoryId") Long categoryId,@Param("list") List<Long> list,
                                    @Param("pageSize")Long pageSize,@Param("pageNum")Long pageNum);

    List<PmsSpuInfo> selectByIdListAndBrand(@Param("list") List<Long> list,@Param("brandId") Long brandId,
                                            @Param("categoryId") Long categoryId,@Param("pageSize")Long pageSize,
                                            @Param("pageNum")Long pageNum);

    List<PmsSpuInfo> selectByBrandId(@Param("id") Long theId,@Param("categoryId") Long categoryId,
                                     @Param("pageSize")Long pageSize,@Param("pageNum")Long pageNum);

    List<PmsSpuInfo> selectByCategoryIdNoLimit(@Param("categoryId") Long categoryId,@Param("pageSize")Long pageSize,
                                               @Param("pageNum")Long pageNum);

    List<Long> searchByKeyWord(String keyWord);
}
